<?php

class Common_Mixin_Logger
{

    private $obj_logger = null;

    public function setLogger(Zend_Log $obj_logger)
    {
        $this->obj_logger = $obj_logger;
    }

    public function getLogger()
    {
        return $this->obj_logger;
    }

    public function hasLogger()
    {
        return !is_null($this->obj_logger);
    }

    public function log($str_message, $enm_priority = Zend_Log::INFO)
    {
        if($this->hasLogger()) {
            $this->obj_logger->log($str_message, $enm_priority);
        }
    }

}